package com.ib.algokit.history;

import java.io.Serializable;

import org.activequant.core.domainmodel.InstrumentSpecification;
import org.activequant.core.types.TimeStamp;

public abstract class TradeEvent implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = -8699456752753565225L;
	/**
	 * private Long id;
	 */
	private Long id;
	/**
	 * private TimeStamp eventTimeStamp;
	 */
	private TimeStamp eventTimeStamp;
	/**
	 * private String message;
	 */
	private String message;
	/**
	 * private InstrumentSpecification instrumentSpecification;
	 */
	private InstrumentSpecification instrumentSpecification; 
	/**
	 * Creates empty event.<br/>
	 * An empty OrderEvent constructor
	 */
	public TradeEvent() { }
	
	/**
	 * Creates populated event.<br/>
	 * constructs an TradeEvent using the given stamp(TimeStamp), message(String) and instrumentSpecification(InstrumentSpecification) to set its
	 * associated eventTimeStamp(TimeStamp), message(String) and instrumentSpecification(InstrumentSpecification)
	 * @param stamp time stamp.
	 * @param message message.
	 * @param instrumentSpecification.
	 */
	public TradeEvent(TimeStamp stamp, String message, InstrumentSpecification instrumentSpecification) {
		this.eventTimeStamp = stamp;
		this.message = message;
		this.instrumentSpecification = instrumentSpecification;
	}
	/**
	 * returns the associated id(Long)
	 * @return
	 */
	public Long getId() {
		return id;
	}
	/**
	 * sets the associated id(Long) with the given val(Long)
	 * @param val
	 */
	public void setId(Long val) {
		id = val;
	}
	
	/**
	/**
	 * Time stamp of this event.<br/>
	 * returns the associated eventTimeStamp(TimeStamp)
	 * @return event time stamp.
	 */
	public TimeStamp getEventTimeStamp() {
		return eventTimeStamp;
	}
	
	/**
	 * Sets event time stamp.<br/>
	 * sets the associated eventTimeStamp(TimeStamp) with the given val(TimeStamp)
	 * @param val time stamp.
	 */
	public void setEventTimeStamp(TimeStamp val) {
		eventTimeStamp = val;
	}

	/**
	 * Message that accompany this event. May help to explain the reason
	 * (i.e. why order has been rejected).<br/>
	 * returns the associated message(String)
	 * @return message.
	 */
	public String getMessage() {
		return message;
	}
	
	/**
	 * Sets message.<br/>
	 * sets the associated message(String) with the given val(String)
	 * @param val message.
	 */
	public void setMessage(String val) {
		message = val;
	}
	
	/**
	 * returns the associated instrumentSpecification(InstrumentSpecification)
	 * @return instrumentSpecification.
	 */
	public InstrumentSpecification getInstrumentSpecification() {
		return instrumentSpecification;
	}
	
	/**
	 * sets the associated instrumentSpecification(InstrumentSpecification) with the given instrumentSpecification(InstrumentSpecification)
	 * @param instrumentSpecification.
	 */
	public void setInstrumentSpecification(InstrumentSpecification instrumentSpecification) {
		this.instrumentSpecification = instrumentSpecification;
	}
	
}